<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" import="java.util.Enumeration,java.net.URLEncoder" %>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>   
<%@ taglib  uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	
	String paramsString = "";
	Enumeration paramNames = (Enumeration)request.getParameterNames();
	while(paramNames.hasMoreElements()){
		String name = (String)paramNames.nextElement();
		if(name.indexOf("pager.")!=-1){
			continue;
		}
		
		String[] values = request.getParameterValues(name);
		if(values.length==1){
			paramsString = paramsString + "&" + name + "=" + URLEncoder.encode(values[0],"utf-8");
		}else if(values.length>1){
			for(String value : values){
				paramsString = paramsString + "&" + name + "=" + URLEncoder.encode(value,"utf-8");
			}
		}
	}
	request.setAttribute("paramsString",paramsString);
%>
	<style type="text/css">
	  .goodsDiv{
	         positon:relative;
	         width:100px;
	         height:30px;
	         border:1px;
	      }	         
	</style>
	<span class="Notices">共<strong>${pager.totalSize}</strong>条数据,分<strong>${pager.totalPageCount}</strong>页显示,当前为第<strong>${pager.currentPageNumber}</strong>页</span>
        <ul>
        <pg:pager items="${pager.totalPageCount}" url="${pageUrl}" maxPageItems="1" export="currentPageNumber=pageNumber"  >   
            <pg:index>   
               <li><pg:first><a href="${pageUrl}${paramsString}"><nobr>&nbsp;[首页]</nobr></a></pg:first></li> 
               <li><pg:prev><a href="${pageUrl}${paramsString}">前一页</a></pg:prev></li>  
               <pg:pages>   
                     <c:choose>   
                        <c:when test="${currentPageNumber eq pageNumber}">     
                            <!-- <font color="red">${pageNumber}</font>  -->
                            <li><a href="${pageUrl}${paramsString}"><font color="red">${pageNumber}</font></a></li>
                        </c:when>     
                        <c:otherwise>     
                           <li><a href="${pageUrl}${paramsString}">${pageNumber}</a></li>
                        </c:otherwise>     
                     </c:choose>   
               </pg:pages>   
               <li><pg:next><a href="${pageUrl}${paramsString}">下一页</a></pg:next></li>
               <li><pg:last><a href="${pageUrl}${paramsString}"><nobr>[尾页]</nobr></a></pg:last></li>   
            </pg:index>       
        </pg:pager>
        </ul>
